<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>sticky应用案例2 - 图片堆叠效果</title>
    <style>
        table {
            border-collapse: collapse;
        }

        th {
            position: sticky;
            top: 0px;
            height: 40px;
            background-color: hotpink;
        }

        td {
            width: 200px;
            height: 40px;
            line-height: 40px;
            text-align: center;
        }
    </style>
</head>

<body>
    <img src="images/mm1.jpg" alt="">
    <img src="images/mm2.jpg" alt="">
    <table border="1">
        <thead>
            <tr>
                <th>Name</th>
                <th>Favorite Color</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
            <tr>
                <td>Bob</td>
                <td>Yellow</td>
            </tr>
            <tr>
                <td>Michelle</td>
                <td>Purple</td>
            </tr>
        </tbody>
    </table>
</body>

</html>